BEGIN;

ALTER TABLE user ADD INDEX user_sid_idx (sid);
ALTER TABLE user ADD INDEX user_object_state_idx (object_state);

ALTER TABLE district ADD INDEX district_sid_idx (sid);
ALTER TABLE district ADD INDEX district_object_state_idx (object_state);
ALTER TABLE district ADD INDEX district_name_idx (name);
ALTER TABLE district ADD INDEX district_user_id_idx (user_id);

ALTER TABLE school_type ADD INDEX school_type_sid_idx (sid);
ALTER TABLE school_type ADD INDEX school_type_object_state_idx (object_state);
ALTER TABLE school_type ADD INDEX school_type_name_idx (name);
ALTER TABLE school_type ADD INDEX school_type_user_id_idx (user_id);

ALTER TABLE school ADD INDEX school_sid_idx (sid);
ALTER TABLE school ADD INDEX school_object_state_idx (object_state);
ALTER TABLE school ADD INDEX school_user_id_idx (user_id);
ALTER TABLE school ADD INDEX school_type_id_idx (type_id);

ALTER TABLE contact_person ADD INDEX contact_person_sid_idx (sid);
ALTER TABLE contact_person ADD INDEX contact_person_object_state_idx (object_state);
ALTER TABLE contact_person ADD INDEX contact_person_school_id_idx (school_id);

ALTER TABLE room ADD INDEX room_sid_idx (sid);
ALTER TABLE room ADD INDEX room_object_state_idx (object_state);
ALTER TABLE room ADD INDEX room_user_id_idx (user_id);

ALTER TABLE room_place ADD INDEX room_place_sid_idx (sid);
ALTER TABLE room_place ADD INDEX room_place_object_state_idx (object_state);
ALTER TABLE room_place ADD INDEX room_place_room_sid_idx (room_sid);

ALTER TABLE event ADD INDEX event_sid_idx (sid);
ALTER TABLE event ADD INDEX event_object_state_idx (object_state);
ALTER TABLE event ADD INDEX event_room_id_idx (room_id);

COMMIT;